I would use ext-interface when dynamically updating the ecard

and then as you say preset the text var when the use receives the card

I would use a flashvar to tell the swf which interface it is being used in
creation or view of ecard

I would update an exinterface function when the text box is updated (I would
also change the layout abit so there the main swf is in view whilst the user
is changing the box - it jumped me there below the swf)

with jquery this should be no problem.

For a definitive guide to setting up external interface see a tutorial on
http://learnswfobject.com/advanced-topics/external-interface/

this tutorial is what I think you were describing
http://learnswfobject.com/advanced-topics/swfobject-and-ajax/

but that way your updating the entire swf rather than just the var (perhaps
you could use this method to provide options made available during the
creation of ecards)


also I would move the script that places the object in the page to the head
of your document

hth - S

ps ie7 will load jquery twice (its not the same file either this may give
you issues in that browser)



On 11 May 2010 20:02, 20100511 <burtonf...@yahoo.com> wrote:

> I have an ecard site. Part of that site allows users to enter their
> own message which then appears within a flash SWF file.
>
> This is an example page:
>
> http://jimpix.co.uk/ecards/4560-type-your-own-message.html
>
> And this is the example HTML that is used to display the SWF file
> using SWFObject:
>
> <div id="swfcontainer">
>    <div id="myContent"></div>
>    <script type="text/javascript">
>        var flashvars = {
>          txtVar01: "What you type, appears in bouncing letters. Click
> in the dark box at any time to change the text effect",
>          txtVar02: "",
>          txtVar03: "",
>          txtVar04: ""
>        };
>        var params = {
>          wmode: "opaque",
>          menu: "false"
>        };
>        var attributes = {
>          id: "myDynamicContent",
>          name: "myDynamicContent"
>        };
>
>        swfobject.embedSWF("../ub6illaw/flash/swf/
> make_your_own_text.swf", "myContent", "800", "600",
> "9.0.0","expressInstall.swf", flashvars, params, attributes);
>    </script>
> </div>
>
> When users enter their own text, they have to submit a form, to send
> the textarea contents back to the page, so that the flash content can
> be updated.
>
> I'd prefer to do this immediately, i.e. as you type in the textarea
> box, the flash updates right away.
>
> I can see that one way this could be done is by using AJAX, but I'm
> not sure how to go about it, and would appreciate some advice if
> possible please.
>
> In this case, I'm not needing to connect to a database - just update a
> region of the page that holds the relevant "txtVar01" value in the
> SWFObject javascript.
>
> I have done some basic work in Ajax before, using this simple example
> as a starting point:
>
>
> http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/ullman-ajax.html
>
> I can see on Google Advanced Search (http://www.google.co.uk/
> advanced_search) something which might be what I'm after - as you type
> in the query in the text box it appears in the div at the top that
> says "Use the form below and your advanced search will appear here".
>
> Anyway, apologies for the essay.
>
> Any advice much appreciated
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to swfobj...@googlegroups.com.
> To unsubscribe from this group, send email to
> swfobject+unsubscr...@googlegroups.com<swfobject%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to swfobj...@googlegroups.com.
To unsubscribe from this group, send email to 
swfobject+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to